﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp7
{
    class Person
    {
        public string Name { get; set; }

        public Person(string name)
        {
            this.Name = name;

        }
        public virtual int Hello()
        {

            return 0;
        }
    }
    class Myself : Person
    {
        public Myself(string name) : base(name)
        {
        }
        public override int Hello()
        {
            Console.WriteLine("请出拳：1、剪刀 2 、石头 3、 布  (请输入相应数字)");
            int chose = int.Parse(Console.ReadLine());
            return chose;

        }
    }
    class Liubei : Person
    {

        public Liubei(string name) : base(name)
        {

        }
        public override int Hello()
        {
            Random ra = new Random();
            int a = ra.Next(3) + 1;
            Fist fist = (Fist)a;
            Console.WriteLine("{0} 出拳：" + fist, this.Name);
            return a;

        }

    }

}



